package com._520it.crm.mapper;

import com._520it.crm.domain.Employee;
import com._520it.crm.domain.Role;
import com._520it.crm.query.RoleQueryObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    Integer queryforCount(RoleQueryObject qo);

    List<Employee> queryforList(RoleQueryObject qo);

    void insertPermissionRelation(@Param("roleId") Long roleId,@Param("permissionId") Long PermissionId);

    List<Role> queryRoleIdByEmployeeId(Long employeeId);

    void deletePermissionRelation(Long id);

    List<String> queryRoleSnByEmpId(Long id);
}
